.class public Lcom/xiaomi/notes/NoteEditActivity;
.super Landroid/app/Activity;
.source "NoteEditActivity.java"


# static fields
.field public static final N_NOTE_BG_COLOR_1:I = 0x1

.field public static final N_NOTE_BG_COLOR_2:I = 0x2

.field public static final N_NOTE_BG_COLOR_3:I = 0x3

.field public static final N_NOTE_BG_COLOR_4:I = 0x4

.field public static final N_NOTE_BG_COLOR_5:I = 0x5

.field public static final N_STATE_BGCOLOR:I = 0x1

.field public static final N_STATE_FONTSIZE:I = 0x2

.field public static final N_STATE_NORMAL:I

.field public static context:Lcom/xiaomi/notes/NoteEditActivity;


# instance fields
.field private barFontSize:Landroid/widget/SeekBar;

.field private blnNewWidget:Z

.field private btnAlertTime:Landroid/widget/ImageButton;

.field private btnChangeColor:Landroid/widget/ImageView;

.field private btnColor1:Landroid/widget/ImageView;

.field private btnColor2:Landroid/widget/ImageView;

.field private btnColor3:Landroid/widget/ImageView;

.field private btnColor4:Landroid/widget/ImageView;

.field private btnColor5:Landroid/widget/ImageView;

.field private db:Lcom/xiaomi/notes/DBOperate;

.field private edtCheckListItem:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/xiaomi/notes/CustomCheckListEditText;",
            ">;"
        }
    .end annotation
.end field

.field private edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

.field private imgBg:Landroid/widget/ImageView;

.field private imgCheckListItem:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/widget/ImageView;",
            ">;"
        }
    .end annotation
.end field

.field private layoutBgColor:Landroid/widget/LinearLayout;

.field private layoutBgHead:Landroid/widget/LinearLayout;

.field private layoutFontSize:Landroid/widget/LinearLayout;

.field private layoutItemComponent:Landroid/widget/LinearLayout;

.field private nAlertTime:J

.field private nBgColor:I

.field private nCheckList:I

.field private nFolderId:I

.field private nFontSize:I

.field private nId:I

.field private nState:I

.field private nWidgetId:I

.field public nWidgetSize:I

.field private objConfig:[Ljava/lang/Object;

.field private objInflater:Landroid/view/LayoutInflater;

.field private strCheckListFlag:Ljava/lang/String;

.field private strSaveFlag:Ljava/lang/String;

.field private txtAlertTime:Landroid/widget/TextView;

.field private txtCreateTime:Landroid/widget/TextView;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 54
    const/4 v0, 0x0

    sput-object v0, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    return-void
.end method

.method public constructor <init>()V
    .locals 3

    .prologue
    const/4 v1, -0x1

    const/4 v2, 0x0

    const/4 v0, 0x0

    .line 37
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 56
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    .line 60
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgBg:Landroid/widget/ImageView;

    .line 62
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgColor:Landroid/widget/LinearLayout;

    .line 64
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    .line 66
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    .line 68
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    .line 70
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgCheckListItem:Ljava/util/ArrayList;

    .line 72
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgHead:Landroid/widget/LinearLayout;

    .line 74
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor1:Landroid/widget/ImageView;

    .line 76
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor2:Landroid/widget/ImageView;

    .line 78
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor3:Landroid/widget/ImageView;

    .line 80
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor4:Landroid/widget/ImageView;

    .line 82
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor5:Landroid/widget/ImageView;

    .line 84
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnChangeColor:Landroid/widget/ImageView;

    .line 86
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutFontSize:Landroid/widget/LinearLayout;

    .line 88
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->barFontSize:Landroid/widget/SeekBar;

    .line 90
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnAlertTime:Landroid/widget/ImageButton;

    .line 92
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtAlertTime:Landroid/widget/TextView;

    .line 94
    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtCreateTime:Landroid/widget/TextView;

    .line 96
    iput v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    .line 98
    iput v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    .line 100
    const/4 v0, 0x1

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    .line 102
    iput v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    .line 104
    iput v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    .line 106
    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    .line 108
    iput v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    .line 110
    const-string v0, ""

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    .line 112
    iput v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    .line 118
    iput v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetSize:I

    return-void
.end method

.method static synthetic access$000(Lcom/xiaomi/notes/NoteEditActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    return v0
.end method

.method static synthetic access$100(Lcom/xiaomi/notes/NoteEditActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    return v0
.end method

.method static synthetic access$200(Lcom/xiaomi/notes/NoteEditActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    return v0
.end method

.method static synthetic access$202(Lcom/xiaomi/notes/NoteEditActivity;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 37
    iput p1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    return p1
.end method

.method static synthetic access$300(Lcom/xiaomi/notes/NoteEditActivity;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->isCheckListMode()Z

    move-result v0

    return v0
.end method

.method static synthetic access$400(Lcom/xiaomi/notes/NoteEditActivity;I)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 37
    invoke-direct {p0, p1}, Lcom/xiaomi/notes/NoteEditActivity;->setCheckListFontSize(I)V

    return-void
.end method

.method static synthetic access$500(Lcom/xiaomi/notes/NoteEditActivity;)Lcom/xiaomi/notes/CustomAutoLinkEditText;
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    return-object v0
.end method

.method static synthetic access$600(Lcom/xiaomi/notes/NoteEditActivity;)[Ljava/lang/Object;
    .locals 1
    .parameter "x0"

    .prologue
    .line 37
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    return-object v0
.end method

.method static synthetic access$700(Lcom/xiaomi/notes/NoteEditActivity;I)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 37
    invoke-direct {p0, p1}, Lcom/xiaomi/notes/NoteEditActivity;->setNoteColor(I)V

    return-void
.end method

.method static synthetic access$800(Lcom/xiaomi/notes/NoteEditActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 37
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->deleteDataFromRecord()V

    return-void
.end method

.method private deleteDataFromRecord()V
    .locals 3

    .prologue
    .line 803
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    if-gtz v0, :cond_0

    .line 809
    :goto_0
    return-void

    .line 806
    :cond_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    iget v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/DBOperate;->deleteNote(I)V

    .line 807
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "_id"

    const/4 v2, -0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 808
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    iget v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetSize:I

    invoke-static {p0, v0, v1}, Lcom/xiaomi/notes/Tools;->deleteLinkWidget(Landroid/content/Context;II)V

    goto :goto_0
.end method

.method private getCheckListFlag()Ljava/lang/String;
    .locals 4

    .prologue
    .line 851
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    .line 852
    .local v2, sb:Ljava/lang/StringBuilder;
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v1

    .line 853
    .local v1, nums:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-ge v0, v1, :cond_1

    .line 854
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v3, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/xiaomi/notes/CustomCheckListEditText;

    invoke-virtual {v3}, Lcom/xiaomi/notes/CustomCheckListEditText;->getCheckFlag()Z

    move-result v3

    if-eqz v3, :cond_0

    const-string v3, "1"

    :goto_1
    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 853
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 854
    :cond_0
    const-string v3, "0"

    goto :goto_1

    .line 856
    :cond_1
    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    return-object v3
.end method

.method private getCheckListString()Ljava/lang/String;
    .locals 5

    .prologue
    .line 838
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    .line 839
    .local v3, txt:Ljava/lang/StringBuilder;
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v1

    .line 840
    .local v1, nums:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-ge v0, v1, :cond_1

    .line 841
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v4, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/xiaomi/notes/CustomCheckListEditText;

    .line 842
    .local v2, obj:Lcom/xiaomi/notes/CustomCheckListEditText;
    invoke-virtual {v2}, Lcom/xiaomi/notes/CustomCheckListEditText;->getText()Landroid/text/Editable;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;

    .line 843
    const/4 v4, 0x1

    sub-int v4, v1, v4

    if-ge v0, v4, :cond_0

    .line 844
    const-string v4, "\n"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 840
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 847
    .end local v2           #obj:Lcom/xiaomi/notes/CustomCheckListEditText;
    :cond_1
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    return-object v4
.end method

.method private hideSoftKey()V
    .locals 3

    .prologue
    .line 582
    sget-object v1, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const-string v2, "input_method"

    invoke-virtual {v1, v2}, Lcom/xiaomi/notes/NoteEditActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/inputmethod/InputMethodManager;

    .line 584
    .local v0, im:Landroid/view/inputmethod/InputMethodManager;
    if-eqz v0, :cond_0

    .line 585
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v1}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getApplicationWindowToken()Landroid/os/IBinder;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z

    .line 587
    :cond_0
    return-void
.end method

.method private init()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 258
    const v0, 0x7f07000c

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgBg:Landroid/widget/ImageView;

    .line 259
    const v0, 0x7f07000d

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgHead:Landroid/widget/LinearLayout;

    .line 261
    const v0, 0x7f070014

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/CustomAutoLinkEditText;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    .line 262
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v0, p0}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setActivity(Lcom/xiaomi/notes/NoteEditActivity;)V

    .line 263
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    const/16 v1, 0xf

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setAutoLinkMask(I)V

    .line 264
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v0, v2}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setLinksClickable(Z)V

    .line 266
    const v0, 0x7f070013

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    .line 267
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    .line 268
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgCheckListItem:Ljava/util/ArrayList;

    .line 270
    const v0, 0x7f070015

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgColor:Landroid/widget/LinearLayout;

    .line 271
    const v0, 0x7f070016

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor1:Landroid/widget/ImageView;

    .line 272
    const v0, 0x7f070017

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor2:Landroid/widget/ImageView;

    .line 273
    const v0, 0x7f070018

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor3:Landroid/widget/ImageView;

    .line 274
    const v0, 0x7f070019

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor4:Landroid/widget/ImageView;

    .line 275
    const v0, 0x7f07001a

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor5:Landroid/widget/ImageView;

    .line 276
    const v0, 0x7f07001b

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnChangeColor:Landroid/widget/ImageView;

    .line 278
    const v0, 0x7f07001c

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutFontSize:Landroid/widget/LinearLayout;

    .line 279
    const v0, 0x7f07001d

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/SeekBar;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->barFontSize:Landroid/widget/SeekBar;

    .line 280
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->barFontSize:Landroid/widget/SeekBar;

    const/16 v1, 0x1e

    invoke-virtual {v0, v1}, Landroid/widget/SeekBar;->setMax(I)V

    .line 281
    invoke-direct {p0, v2}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableToolsBarFontSize(Z)V

    .line 283
    const v0, 0x7f070010

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageButton;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnAlertTime:Landroid/widget/ImageButton;

    .line 284
    const v0, 0x7f070011

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtAlertTime:Landroid/widget/TextView;

    .line 285
    const v0, 0x7f07000f

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtCreateTime:Landroid/widget/TextView;

    .line 286
    invoke-direct {p0, v2}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableToolsBarBgColor(Z)V

    .line 288
    new-instance v0, Lcom/xiaomi/notes/DBOperate;

    invoke-direct {v0}, Lcom/xiaomi/notes/DBOperate;-><init>()V

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    .line 289
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v0, p0}, Lcom/xiaomi/notes/DBOperate;->openDB(Landroid/content/Context;)V

    .line 291
    return-void
.end method

.method private initFontSize()V
    .locals 2

    .prologue
    .line 567
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    if-nez v0, :cond_0

    .line 568
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    const/4 v1, 0x1

    aget-object v0, v0, v1

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    .line 570
    :cond_0
    return-void
.end method

.method private initListener()V
    .locals 2

    .prologue
    .line 294
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$1;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$1;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 315
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutFontSize:Landroid/widget/LinearLayout;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$2;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$2;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 323
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->barFontSize:Landroid/widget/SeekBar;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$3;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$3;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V

    .line 345
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnChangeColor:Landroid/widget/ImageView;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$4;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$4;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 362
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor1:Landroid/widget/ImageView;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$5;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$5;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 371
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor2:Landroid/widget/ImageView;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$6;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$6;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 380
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor3:Landroid/widget/ImageView;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$7;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$7;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 389
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor4:Landroid/widget/ImageView;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$8;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$8;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 398
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor5:Landroid/widget/ImageView;

    new-instance v1, Lcom/xiaomi/notes/NoteEditActivity$9;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteEditActivity$9;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 407
    return-void
.end method

.method private initResource()V
    .locals 12

    .prologue
    const/4 v8, 0x1

    const-wide/16 v6, 0x0

    const/4 v9, 0x0

    const-string v11, "folderId"

    const-string v10, ""

    .line 411
    invoke-static {p0}, Lcom/xiaomi/notes/Tools;->getConfigData(Landroid/app/Activity;)[Ljava/lang/Object;

    move-result-object v4

    iput-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    .line 412
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->initFontSize()V

    .line 414
    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    if-gez v4, :cond_2

    .line 415
    const-string v4, "android.appwidget.action.APPWIDGET_CONFIGURE"

    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 416
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v4

    invoke-virtual {v4}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    .line 417
    .local v1, extras:Landroid/os/Bundle;
    if-eqz v1, :cond_0

    .line 418
    const-string v4, "appWidgetId"

    invoke-virtual {v1, v4, v9}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v0

    .line 421
    .local v0, appWidgetId:I
    if-eqz v0, :cond_0

    .line 422
    iput-boolean v8, p0, Lcom/xiaomi/notes/NoteEditActivity;->blnNewWidget:Z

    .line 423
    const/4 v4, -0x1

    iput v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    .line 424
    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    .line 433
    .end local v0           #appWidgetId:I
    .end local v1           #extras:Landroid/os/Bundle;
    :cond_0
    :goto_0
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    const/4 v5, 0x4

    aget-object v4, v4, v5

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteEditActivity;->setNoteColor(I)V

    .line 435
    iput-wide v6, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    .line 436
    iget-wide v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    invoke-direct {p0, v9, v4, v5}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableAlertTime(ZJ)V

    .line 438
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtCreateTime:Landroid/widget/TextView;

    sget-object v5, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v6

    invoke-static {v5, v6, v7}, Lcom/xiaomi/notes/Tools;->getTimeMDHM(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 440
    iput v9, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    .line 441
    const-string v4, ""

    iput-object v10, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    .line 442
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    const/16 v5, 0x8

    invoke-virtual {v4, v5}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 443
    const-string v4, ""

    iput-object v10, p0, Lcom/xiaomi/notes/NoteEditActivity;->strSaveFlag:Ljava/lang/String;

    .line 445
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    const/4 v5, 0x0

    invoke-virtual {v4, v5}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setText(Ljava/lang/CharSequence;)V

    .line 446
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    iget v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    int-to-float v5, v5

    invoke-virtual {v4, v5}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setTextSize(F)V

    .line 448
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getWindow()Landroid/view/Window;

    move-result-object v4

    const/16 v5, 0x10

    invoke-virtual {v4, v5}, Landroid/view/Window;->setSoftInputMode(I)V

    .line 449
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->showSoftKey()V

    .line 479
    :goto_1
    return-void

    .line 428
    :cond_1
    iput-boolean v9, p0, Lcom/xiaomi/notes/NoteEditActivity;->blnNewWidget:Z

    .line 429
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v4

    const-string v5, "folderId"

    invoke-virtual {v4, v11, v9}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v4

    iput v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    .line 430
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v4

    const-string v5, "widgetId"

    invoke-virtual {v4, v5, v9}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v4

    iput v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    goto :goto_0

    .line 451
    :cond_2
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    iget v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    invoke-virtual {v4, v5}, Lcom/xiaomi/notes/DBOperate;->getNote(I)Ljava/util/Map;

    move-result-object v2

    .line 453
    .local v2, info:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v4, "alertTime"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Long;

    invoke-virtual {v4}, Ljava/lang/Long;->longValue()J

    move-result-wide v4

    iput-wide v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    .line 454
    iget-wide v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    cmp-long v4, v4, v6

    if-lez v4, :cond_4

    .line 455
    iget-wide v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    invoke-direct {p0, v8, v4, v5}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableAlertTime(ZJ)V

    .line 460
    :goto_2
    iget-object v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtCreateTime:Landroid/widget/TextView;

    sget-object v6, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const-string v4, "fixTime"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Long;

    invoke-virtual {v4}, Ljava/lang/Long;->longValue()J

    move-result-wide v7

    invoke-static {v6, v7, v8}, Lcom/xiaomi/notes/Tools;->getTimeMDHM(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 463
    const-string v4, "bgcolorId"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteEditActivity;->setNoteColor(I)V

    .line 465
    const-string v4, "folderId"

    invoke-interface {v2, v11}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    iput v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    .line 467
    const-string v4, "widgetType"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    iput v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetSize:I

    .line 468
    const-string v4, "widgetId"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    iput v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    .line 470
    const-string v4, "desktopX"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v4

    iput v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    .line 471
    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    if-gez v4, :cond_3

    .line 472
    iput v9, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    .line 474
    :cond_3
    const-string v4, "checklistInfo"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    iput-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    .line 475
    const-string v4, "content"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 476
    .local v3, txt:Ljava/lang/String;
    iput-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->strSaveFlag:Ljava/lang/String;

    .line 477
    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    iget-object v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    invoke-direct {p0, v4, v5, v3}, Lcom/xiaomi/notes/NoteEditActivity;->switchCheckListMode(ILjava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_1

    .line 457
    .end local v3           #txt:Ljava/lang/String;
    :cond_4
    invoke-direct {p0, v9, v6, v7}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableAlertTime(ZJ)V

    goto/16 :goto_2
.end method

.method private isCheckListMode()Z
    .locals 1

    .prologue
    .line 860
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private newNote()V
    .locals 3

    .prologue
    .line 590
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->saveDataToRecord()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 591
    sget-object v0, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const v1, 0x7f050056

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 593
    :cond_0
    const/4 v0, -0x1

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    .line 594
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->initResource()V

    .line 595
    return-void
.end method

.method private requestWidget()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 599
    iget-boolean v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->blnNewWidget:Z

    if-eqz v2, :cond_0

    .line 600
    const/4 v1, 0x0

    .line 601
    .local v1, str:Ljava/lang/String;
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->isCheckListMode()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 602
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListString()Ljava/lang/String;

    move-result-object v1

    .line 607
    :goto_0
    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v2

    if-lez v2, :cond_2

    .line 608
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 609
    .local v0, cancelResultValue:Landroid/content/Intent;
    const-string v2, "appWidgetId"

    iget v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 610
    const/4 v2, -0x1

    invoke-virtual {p0, v2, v0}, Lcom/xiaomi/notes/NoteEditActivity;->setResult(ILandroid/content/Intent;)V

    .line 616
    .end local v0           #cancelResultValue:Landroid/content/Intent;
    .end local v1           #str:Ljava/lang/String;
    :cond_0
    :goto_1
    return-void

    .line 604
    .restart local v1       #str:Ljava/lang/String;
    :cond_1
    iget-object v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v2}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getText()Landroid/text/Editable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 612
    :cond_2
    iput v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    .line 613
    const/4 v2, 0x0

    invoke-virtual {p0, v3, v2}, Lcom/xiaomi/notes/NoteEditActivity;->setResult(ILandroid/content/Intent;)V

    goto :goto_1
.end method

.method private saveDataToRecord()Z
    .locals 13

    .prologue
    .line 749
    const/4 v12, 0x0

    .line 751
    .local v12, ret:Z
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->isCheckListMode()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 752
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListString()Ljava/lang/String;

    move-result-object v10

    .line 753
    .local v10, strContext:Ljava/lang/String;
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListFlag()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    .line 758
    :goto_0
    invoke-static {v10}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 759
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    if-lez v0, :cond_0

    .line 760
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->deleteDataFromRecord()V

    .line 780
    :cond_0
    :goto_1
    if-eqz v12, :cond_1

    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    if-lez v0, :cond_1

    .line 781
    const/4 v11, 0x0

    .line 782
    .local v11, i:Landroid/content/Intent;
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetSize:I

    packed-switch v0, :pswitch_data_0

    .line 791
    :goto_2
    if-eqz v11, :cond_1

    .line 792
    const-string v0, "android.appwidget.action.APPWIDGET_UPDATE"

    invoke-virtual {v11, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 793
    const-string v0, "appWidgetIds"

    const/4 v1, 0x1

    new-array v1, v1, [I

    const/4 v2, 0x0

    iget v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    aput v3, v1, v2

    invoke-virtual {v11, v0, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[I)Landroid/content/Intent;

    .line 796
    invoke-virtual {p0, v11}, Lcom/xiaomi/notes/NoteEditActivity;->sendBroadcast(Landroid/content/Intent;)V

    .line 799
    .end local v11           #i:Landroid/content/Intent;
    :cond_1
    return v12

    .line 755
    .end local v10           #strContext:Ljava/lang/String;
    :cond_2
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v0}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v10

    .restart local v10       #strContext:Ljava/lang/String;
    goto :goto_0

    .line 762
    :cond_3
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    if-gez v0, :cond_4

    .line 763
    invoke-virtual {v10}, Ljava/lang/String;->length()I

    move-result v0

    if-lez v0, :cond_0

    .line 764
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    iget-wide v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    const/4 v3, 0x0

    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    iget v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    iget v6, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetSize:I

    iget v7, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    iget v8, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    iget-object v9, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    invoke-virtual/range {v0 .. v10}, Lcom/xiaomi/notes/DBOperate;->insertNote(JZIIIIILjava/lang/String;Ljava/lang/String;)J

    move-result-wide v0

    long-to-int v0, v0

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    .line 766
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "_id"

    iget v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    int-to-long v2, v2

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;

    .line 767
    const/4 v12, 0x1

    goto :goto_1

    .line 770
    :cond_4
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->strSaveFlag:Ljava/lang/String;

    invoke-virtual {v10, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 771
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    iget v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    const/4 v2, 0x0

    iget-wide v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    const/4 v5, 0x0

    iget v6, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    iget v7, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    iget v8, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    iget-object v9, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    invoke-virtual/range {v0 .. v10}, Lcom/xiaomi/notes/DBOperate;->updateNote(IZJZIIILjava/lang/String;Ljava/lang/String;)V

    .line 777
    :goto_3
    const/4 v12, 0x1

    goto :goto_1

    .line 774
    :cond_5
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    iget v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    const/4 v2, 0x1

    iget-wide v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    const/4 v5, 0x0

    iget v6, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    iget v7, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    iget v8, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    iget-object v9, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    invoke-virtual/range {v0 .. v10}, Lcom/xiaomi/notes/DBOperate;->updateNote(IZJZIIILjava/lang/String;Ljava/lang/String;)V

    goto :goto_3

    .line 784
    .restart local v11       #i:Landroid/content/Intent;
    :pswitch_0
    new-instance v11, Landroid/content/Intent;

    .end local v11           #i:Landroid/content/Intent;
    const-class v0, Lcom/xiaomi/notes/Widget;

    invoke-direct {v11, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 785
    .restart local v11       #i:Landroid/content/Intent;
    goto/16 :goto_2

    .line 787
    :pswitch_1
    new-instance v11, Landroid/content/Intent;

    .end local v11           #i:Landroid/content/Intent;
    const-class v0, Lcom/xiaomi/notes/Widget_44;

    invoke-direct {v11, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .restart local v11       #i:Landroid/content/Intent;
    goto/16 :goto_2

    .line 782
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method private setCheckListFontSize(I)V
    .locals 6
    .parameter "size"

    .prologue
    .line 864
    iget-object v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v2

    .line 865
    .local v2, nums:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-ge v0, v2, :cond_0

    .line 866
    iget-object v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v5, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/xiaomi/notes/CustomCheckListEditText;

    .line 867
    .local v3, obj:Lcom/xiaomi/notes/CustomCheckListEditText;
    int-to-float v5, p1

    invoke-virtual {v3, v5}, Lcom/xiaomi/notes/CustomCheckListEditText;->setTextSize(F)V

    .line 868
    iget-object v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v5, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    .line 869
    .local v1, img:Landroid/widget/ImageView;
    invoke-virtual {v1}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v4

    check-cast v4, Landroid/view/ViewGroup$MarginLayoutParams;

    .line 870
    .local v4, p:Landroid/view/ViewGroup$MarginLayoutParams;
    div-int/lit8 v5, p1, 0x2

    add-int/2addr v5, p1

    div-int/lit8 v5, v5, 0x2

    iput v5, v4, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I

    .line 871
    invoke-virtual {v1, v4}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 865
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 873
    .end local v1           #img:Landroid/widget/ImageView;
    .end local v3           #obj:Lcom/xiaomi/notes/CustomCheckListEditText;
    .end local v4           #p:Landroid/view/ViewGroup$MarginLayoutParams;
    :cond_0
    return-void
.end method

.method private setNoteColor(I)V
    .locals 2
    .parameter "color"

    .prologue
    .line 812
    iput p1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    .line 813
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    packed-switch v0, :pswitch_data_0

    .line 835
    :goto_0
    return-void

    .line 815
    :pswitch_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgBg:Landroid/widget/ImageView;

    const v1, 0x7f020035

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 816
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgHead:Landroid/widget/LinearLayout;

    const v1, 0x7f02003b

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    goto :goto_0

    .line 819
    :pswitch_1
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgBg:Landroid/widget/ImageView;

    const v1, 0x7f020034

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 820
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgHead:Landroid/widget/LinearLayout;

    const v1, 0x7f02003a

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    goto :goto_0

    .line 823
    :pswitch_2
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgBg:Landroid/widget/ImageView;

    const v1, 0x7f020031

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 824
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgHead:Landroid/widget/LinearLayout;

    const v1, 0x7f020037

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    goto :goto_0

    .line 827
    :pswitch_3
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgBg:Landroid/widget/ImageView;

    const v1, 0x7f020033

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 828
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgHead:Landroid/widget/LinearLayout;

    const v1, 0x7f020039

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    goto :goto_0

    .line 831
    :pswitch_4
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgBg:Landroid/widget/ImageView;

    const v1, 0x7f020032

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 832
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgHead:Landroid/widget/LinearLayout;

    const v1, 0x7f020038

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    goto :goto_0

    .line 813
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
    .end packed-switch
.end method

.method private setVisableAlertTime(ZJ)V
    .locals 3
    .parameter "vis"
    .parameter "time"

    .prologue
    const/16 v2, 0x8

    const/4 v1, 0x0

    .line 555
    if-eqz p1, :cond_0

    .line 556
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnAlertTime:Landroid/widget/ImageButton;

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 557
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtAlertTime:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 559
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtAlertTime:Landroid/widget/TextView;

    sget-object v1, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    invoke-static {v1, p2, p3}, Lcom/xiaomi/notes/Tools;->getFuzzyTime(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 564
    :goto_0
    return-void

    .line 561
    :cond_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnAlertTime:Landroid/widget/ImageButton;

    invoke-virtual {v0, v2}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 562
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->txtAlertTime:Landroid/widget/TextView;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_0
.end method

.method private setVisableToolsBarBgColor(Z)V
    .locals 2
    .parameter "vis"

    .prologue
    .line 532
    if-eqz p1, :cond_0

    .line 533
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgColor:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 537
    :goto_0
    return-void

    .line 535
    :cond_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutBgColor:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0
.end method

.method private setVisableToolsBarFontSize(Z)V
    .locals 3
    .parameter "vis"

    .prologue
    .line 540
    if-eqz p1, :cond_1

    .line 541
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutFontSize:Landroid/widget/LinearLayout;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 543
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    if-nez v1, :cond_0

    .line 544
    invoke-static {p0}, Lcom/xiaomi/notes/Tools;->getConfigData(Landroid/app/Activity;)[Ljava/lang/Object;

    move-result-object v1

    iput-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    .line 546
    :cond_0
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    const/4 v2, 0x1

    aget-object v1, v1, v2

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    const/16 v2, 0xa

    sub-int v0, v1, v2

    .line 548
    .local v0, val:I
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->barFontSize:Landroid/widget/SeekBar;

    invoke-virtual {v1, v0}, Landroid/widget/SeekBar;->setProgress(I)V

    .line 552
    .end local v0           #val:I
    :goto_0
    return-void

    .line 550
    :cond_1
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutFontSize:Landroid/widget/LinearLayout;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0
.end method

.method private shareDesktop()V
    .locals 12

    .prologue
    const/4 v3, 0x0

    .line 634
    const/4 v10, 0x0

    .line 636
    .local v10, str:Ljava/lang/String;
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->isCheckListMode()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 637
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListString()Ljava/lang/String;

    move-result-object v10

    .line 642
    :goto_0
    invoke-static {v10}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 643
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    const/4 v1, -0x1

    if-ne v0, v1, :cond_0

    .line 644
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListFlag()Ljava/lang/String;

    move-result-object v9

    .line 645
    .local v9, strCheckListFlag:Ljava/lang/String;
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    iget-wide v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    iget v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFolderId:I

    iget v6, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetSize:I

    iget v7, p0, Lcom/xiaomi/notes/NoteEditActivity;->nWidgetId:I

    iget v8, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    invoke-virtual/range {v0 .. v10}, Lcom/xiaomi/notes/DBOperate;->insertNote(JZIIIIILjava/lang/String;Ljava/lang/String;)J

    move-result-wide v0

    long-to-int v0, v0

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    .line 647
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "_id"

    iget v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    int-to-long v4, v2

    invoke-virtual {v0, v1, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;

    .line 650
    .end local v9           #strCheckListFlag:Ljava/lang/String;
    :cond_0
    const/16 v0, 0x1e

    invoke-static {v10, v0}, Lcom/xiaomi/notes/Tools;->getTitleString(Ljava/lang/CharSequence;I)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v11

    .line 652
    .local v11, title:Ljava/lang/String;
    sget-object v0, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const/4 v1, 0x1

    iget v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    const v4, 0x7f020020

    invoke-static {v0, v11, v1, v2, v4}, Lcom/xiaomi/notes/ShareToApp;->sendToDesktop(Landroid/content/Context;Ljava/lang/String;III)V

    .line 654
    sget-object v0, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const v1, 0x7f050057

    invoke-static {v0, v1, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 656
    .end local v11           #title:Ljava/lang/String;
    :cond_1
    return-void

    .line 639
    :cond_2
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v0}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v10

    goto :goto_0
.end method

.method private shareSms()V
    .locals 3

    .prologue
    .line 619
    const/4 v1, 0x0

    .line 620
    .local v1, str:Ljava/lang/String;
    const/4 v0, 0x0

    .line 622
    .local v0, lng:I
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->isCheckListMode()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 623
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListString()Ljava/lang/String;

    move-result-object v1

    .line 627
    :goto_0
    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v0

    .line 628
    if-lez v0, :cond_0

    .line 629
    sget-object v2, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    invoke-static {v2, v1}, Lcom/xiaomi/notes/ShareToApp;->callSend(Landroid/content/Context;Ljava/lang/String;)V

    .line 631
    :cond_0
    return-void

    .line 625
    :cond_1
    iget-object v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v2}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getText()Landroid/text/Editable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method private showDeleteDialog()V
    .locals 3

    .prologue
    .line 730
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v1, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 731
    .local v0, alert:Landroid/app/AlertDialog$Builder;
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 732
    const v1, 0x7f050065

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    .line 733
    const v1, 0x7f050066

    new-instance v2, Lcom/xiaomi/notes/NoteEditActivity$10;

    invoke-direct {v2, p0}, Lcom/xiaomi/notes/NoteEditActivity$10;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 740
    const v1, 0x7f050067

    new-instance v2, Lcom/xiaomi/notes/NoteEditActivity$11;

    invoke-direct {v2, p0}, Lcom/xiaomi/notes/NoteEditActivity$11;-><init>(Lcom/xiaomi/notes/NoteEditActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 745
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 746
    return-void
.end method

.method private showSetTimeDialog()V
    .locals 3

    .prologue
    .line 724
    new-instance v0, Lcom/xiaomi/notes/AlertTimeSetting;

    sget-object v1, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    invoke-direct {v0, v1}, Lcom/xiaomi/notes/AlertTimeSetting;-><init>(Landroid/content/Context;)V

    .line 725
    .local v0, obj:Lcom/xiaomi/notes/AlertTimeSetting;
    iget-wide v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    invoke-virtual {v0, v1, v2}, Lcom/xiaomi/notes/AlertTimeSetting;->initRes(J)Lcom/xiaomi/notes/AlertTimeSetting;

    .line 726
    invoke-virtual {v0}, Lcom/xiaomi/notes/AlertTimeSetting;->show()V

    .line 727
    return-void
.end method

.method private showSoftKey()V
    .locals 4

    .prologue
    const/4 v3, 0x2

    .line 573
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v1}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->requestFocus()Z

    .line 574
    sget-object v1, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const-string v2, "input_method"

    invoke-virtual {v1, v2}, Lcom/xiaomi/notes/NoteEditActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/inputmethod/InputMethodManager;

    .line 576
    .local v0, im:Landroid/view/inputmethod/InputMethodManager;
    if-eqz v0, :cond_0

    .line 577
    invoke-virtual {v0, v3, v3}, Landroid/view/inputmethod/InputMethodManager;->toggleSoftInput(II)V

    .line 579
    :cond_0
    return-void
.end method

.method private switchCheckListMode()V
    .locals 3

    .prologue
    .line 659
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->isCheckListMode()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 660
    const/4 v0, 0x0

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    .line 661
    const-string v0, ""

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    .line 662
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v0, v1, v2}, Lcom/xiaomi/notes/NoteEditActivity;->switchCheckListMode(ILjava/lang/String;Ljava/lang/String;)V

    .line 667
    :goto_0
    return-void

    .line 664
    :cond_0
    const/4 v0, 0x1

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    .line 665
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->strCheckListFlag:Ljava/lang/String;

    iget-object v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v2}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getText()Landroid/text/Editable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v0, v1, v2}, Lcom/xiaomi/notes/NoteEditActivity;->switchCheckListMode(ILjava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method private switchCheckListMode(ILjava/lang/String;Ljava/lang/String;)V
    .locals 8
    .parameter "flag"
    .parameter "checkFlag"
    .parameter "txt"

    .prologue
    const/16 v4, 0x8

    const/4 v7, -0x1

    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 670
    if-lez p1, :cond_2

    .line 672
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v3, v4}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setVisibility(I)V

    .line 673
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v5}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 674
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    invoke-virtual {v3}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 675
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->clear()V

    .line 676
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->clear()V

    .line 678
    const-string v3, "\n"

    invoke-virtual {p3, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    .line 679
    .local v1, items:[Ljava/lang/String;
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v2

    .line 680
    .local v2, lng:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    array-length v3, v1

    if-ge v0, v3, :cond_3

    .line 681
    if-ge v0, v2, :cond_1

    .line 682
    invoke-virtual {p2, v0}, Ljava/lang/String;->charAt(I)C

    move-result v3

    const/16 v4, 0x30

    if-ne v3, v4, :cond_0

    .line 683
    aget-object v3, v1, v0

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3, v5, v6, v7}, Lcom/xiaomi/notes/NoteEditActivity;->insertChildView(Ljava/lang/String;ZZI)Lcom/xiaomi/notes/CustomCheckListEditText;

    .line 680
    :goto_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 685
    :cond_0
    aget-object v3, v1, v0

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3, v6, v6, v7}, Lcom/xiaomi/notes/NoteEditActivity;->insertChildView(Ljava/lang/String;ZZI)Lcom/xiaomi/notes/CustomCheckListEditText;

    goto :goto_1

    .line 688
    :cond_1
    aget-object v3, v1, v0

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3, v5, v6, v7}, Lcom/xiaomi/notes/NoteEditActivity;->insertChildView(Ljava/lang/String;ZZI)Lcom/xiaomi/notes/CustomCheckListEditText;

    goto :goto_1

    .line 693
    .end local v0           #i:I
    .end local v1           #items:[Ljava/lang/String;
    .end local v2           #lng:I
    :cond_2
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 694
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v3, v5}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setVisibility(I)V

    .line 695
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v3, p3}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setText(Ljava/lang/CharSequence;)V

    .line 696
    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    int-to-float v4, v4

    invoke-virtual {v3, v4}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setTextSize(F)V

    .line 698
    :cond_3
    return-void
.end method


# virtual methods
.method public callBackText()V
    .locals 2

    .prologue
    .line 254
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->strSaveFlag:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->setText(Ljava/lang/CharSequence;)V

    .line 255
    return-void
.end method

.method public clearAlertServer()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 714
    new-instance v1, Landroid/content/Intent;

    sget-object v3, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const-class v4, Lcom/xiaomi/notes/PlayAlertSound;

    invoke-direct {v1, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 715
    .local v1, intent:Landroid/content/Intent;
    sget-object v3, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    invoke-static {v3, v5, v1, v5}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v2

    .line 716
    .local v2, sender:Landroid/app/PendingIntent;
    const-string v3, "alarm"

    invoke-virtual {p0, v3}, Lcom/xiaomi/notes/NoteEditActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/AlarmManager;

    .line 717
    .local v0, alermManager:Landroid/app/AlarmManager;
    invoke-virtual {v0, v2}, Landroid/app/AlarmManager;->cancel(Landroid/app/PendingIntent;)V

    .line 719
    const-wide/16 v3, 0x0

    iput-wide v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    .line 720
    iget-wide v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    invoke-direct {p0, v5, v3, v4}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableAlertTime(ZJ)V

    .line 721
    return-void
.end method

.method public deleteChildView(I)V
    .locals 2
    .parameter "index"

    .prologue
    .line 939
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    .line 947
    :goto_0
    return-void

    .line 944
    :cond_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    invoke-virtual {v0, p1}, Landroid/widget/LinearLayout;->removeViewAt(I)V

    .line 945
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    .line 946
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    goto :goto_0
.end method

.method public getChildViewIndex(Landroid/view/View;)I
    .locals 2
    .parameter "v"

    .prologue
    .line 876
    invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/view/View;

    .line 877
    .local v0, view:Landroid/view/View;
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->indexOfChild(Landroid/view/View;)I

    move-result v1

    return v1
.end method

.method public getPreEditText(I)Lcom/xiaomi/notes/CustomCheckListEditText;
    .locals 3
    .parameter "index"

    .prologue
    .line 881
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 883
    .local v0, nums:I
    if-nez v0, :cond_0

    .line 884
    const/4 v1, 0x0

    .line 891
    .end local p0
    :goto_0
    return-object v1

    .line 887
    .restart local p0
    :cond_0
    if-ltz p1, :cond_1

    const/4 v1, 0x1

    sub-int v1, v0, v1

    if-le p1, v1, :cond_2

    .line 888
    :cond_1
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/xiaomi/notes/CustomCheckListEditText;

    move-object v1, p0

    goto :goto_0

    .line 891
    .restart local p0
    :cond_2
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/xiaomi/notes/CustomCheckListEditText;

    move-object v1, p0

    goto :goto_0
.end method

.method public getState()I
    .locals 1

    .prologue
    .line 482
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    return v0
.end method

.method public insertChildView(Ljava/lang/String;ZZI)Lcom/xiaomi/notes/CustomCheckListEditText;
    .locals 8
    .parameter "item"
    .parameter "check"
    .parameter "initFlag"
    .parameter "index"

    .prologue
    const/4 v7, 0x0

    .line 906
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->objInflater:Landroid/view/LayoutInflater;

    const v5, 0x7f030002

    const/4 v6, 0x0

    invoke-virtual {v4, v5, v6, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v3

    .line 907
    .local v3, view:Landroid/view/View;
    const v4, 0x7f070004

    invoke-virtual {v3, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/xiaomi/notes/CustomCheckListEditText;

    .line 908
    .local v2, text:Lcom/xiaomi/notes/CustomCheckListEditText;
    const v4, 0x7f070003

    invoke-virtual {v3, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 909
    .local v0, img:Landroid/widget/ImageView;
    invoke-virtual {v2, p0}, Lcom/xiaomi/notes/CustomCheckListEditText;->setActivity(Lcom/xiaomi/notes/NoteEditActivity;)V

    .line 910
    invoke-virtual {v2, v0}, Lcom/xiaomi/notes/CustomCheckListEditText;->setImageCheck(Landroid/widget/ImageView;)V

    .line 911
    invoke-virtual {v2, p2}, Lcom/xiaomi/notes/CustomCheckListEditText;->setCheckFlag(Z)V

    .line 912
    invoke-virtual {v2, p1}, Lcom/xiaomi/notes/CustomCheckListEditText;->setText(Ljava/lang/CharSequence;)V

    .line 913
    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    int-to-float v4, v4

    invoke-virtual {v2, v4}, Lcom/xiaomi/notes/CustomCheckListEditText;->setTextSize(F)V

    .line 914
    invoke-virtual {v0}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/view/ViewGroup$MarginLayoutParams;

    .line 915
    .local v1, p:Landroid/view/ViewGroup$MarginLayoutParams;
    iget v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    iget v5, p0, Lcom/xiaomi/notes/NoteEditActivity;->nFontSize:I

    div-int/lit8 v5, v5, 0x2

    add-int/2addr v4, v5

    div-int/lit8 v4, v4, 0x2

    iput v4, v1, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I

    .line 916
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 918
    if-eqz p3, :cond_0

    .line 919
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_2

    .line 920
    const/4 v4, 0x4

    invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 926
    :cond_0
    :goto_0
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->layoutItemComponent:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v3, p4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V

    .line 927
    if-ltz p4, :cond_1

    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    const/4 v5, 0x1

    sub-int/2addr v4, v5

    if-le p4, v4, :cond_3

    .line 928
    :cond_1
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v4, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 929
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v4, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 935
    :goto_1
    return-object v2

    .line 922
    :cond_2
    invoke-virtual {v0, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0

    .line 931
    :cond_3
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v4, p4, v2}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V

    .line 932
    iget-object v4, p0, Lcom/xiaomi/notes/NoteEditActivity;->imgCheckListItem:Ljava/util/ArrayList;

    invoke-virtual {v4, p4, v0}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V

    goto :goto_1
.end method

.method public isTextCanCallBack()Z
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 244
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->strSaveFlag:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    move v0, v2

    .line 250
    :goto_0
    return v0

    .line 247
    :cond_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v0}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->strSaveFlag:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    move v0, v2

    .line 248
    goto :goto_0

    .line 250
    :cond_1
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 4
    .parameter "savedInstanceState"

    .prologue
    .line 125
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 127
    sput-object p0, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    .line 129
    const v0, 0x7f030005

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteEditActivity;->setContentView(I)V

    .line 131
    sget-object v0, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    const-string v1, "layout_inflater"

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/NoteEditActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    iput-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->objInflater:Landroid/view/LayoutInflater;

    .line 133
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "_id"

    const-wide/16 v2, -0x1

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J

    move-result-wide v0

    long-to-int v0, v0

    iput v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    .line 135
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->init()V

    .line 136
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->initResource()V

    .line 137
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->initListener()V

    .line 138
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 154
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 156
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    if-eqz v0, :cond_0

    .line 157
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v0}, Lcom/xiaomi/notes/DBOperate;->close()V

    .line 159
    :cond_0
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v1, 0x0

    .line 225
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    .line 226
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    packed-switch v0, :pswitch_data_0

    .line 238
    :goto_0
    const/4 v0, 0x1

    .line 240
    :goto_1
    return v0

    .line 228
    :pswitch_0
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->requestWidget()V

    .line 229
    sget-object v0, Lcom/xiaomi/notes/NoteEditActivity;->context:Lcom/xiaomi/notes/NoteEditActivity;

    invoke-virtual {v0}, Lcom/xiaomi/notes/NoteEditActivity;->finish()V

    goto :goto_0

    .line 232
    :pswitch_1
    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteEditActivity;->setState(I)V

    goto :goto_0

    .line 235
    :pswitch_2
    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteEditActivity;->setState(I)V

    goto :goto_0

    .line 240
    :cond_0
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_1

    .line 226
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 2
    .parameter "item"

    .prologue
    .line 194
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v0

    .line 195
    .local v0, id:I
    packed-switch v0, :pswitch_data_0

    .line 219
    :goto_0
    const/4 v1, 0x1

    return v1

    .line 197
    :pswitch_0
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->newNote()V

    goto :goto_0

    .line 200
    :pswitch_1
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->showSetTimeDialog()V

    goto :goto_0

    .line 203
    :pswitch_2
    const/4 v1, 0x2

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteEditActivity;->setState(I)V

    goto :goto_0

    .line 206
    :pswitch_3
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->showDeleteDialog()V

    goto :goto_0

    .line 209
    :pswitch_4
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->shareSms()V

    goto :goto_0

    .line 212
    :pswitch_5
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->shareDesktop()V

    goto :goto_0

    .line 216
    :pswitch_6
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->switchCheckListMode()V

    goto :goto_0

    .line 195
    :pswitch_data_0
    .packed-switch 0x7f07001e
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_6
        :pswitch_6
        :pswitch_5
        :pswitch_4
    .end packed-switch
.end method

.method protected onPause()V
    .locals 1

    .prologue
    .line 142
    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    .line 143
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->hideSoftKey()V

    .line 146
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->saveDataToRecord()Z

    .line 149
    iget-object v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->objConfig:[Ljava/lang/Object;

    invoke-static {p0, v0}, Lcom/xiaomi/notes/Tools;->setConfigData(Landroid/app/Activity;[Ljava/lang/Object;)V

    .line 150
    return-void
.end method

.method public onPrepareOptionsMenu(Landroid/view/Menu;)Z
    .locals 3
    .parameter "menu"

    .prologue
    const/4 v2, 0x0

    .line 168
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->hideSoftKey()V

    .line 169
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    packed-switch v0, :pswitch_data_0

    .line 188
    :goto_0
    const/4 v0, 0x1

    return v0

    .line 171
    :pswitch_0
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    .line 172
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    const v1, 0x7f030006

    invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    .line 174
    iget v0, p0, Lcom/xiaomi/notes/NoteEditActivity;->nCheckList:I

    if-nez v0, :cond_0

    .line 175
    const v0, 0x7f070023

    invoke-interface {p1, v0}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v2}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    goto :goto_0

    .line 177
    :cond_0
    const v0, 0x7f070022

    invoke-interface {p1, v0}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v2}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    goto :goto_0

    .line 181
    :pswitch_1
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    goto :goto_0

    .line 184
    :pswitch_2
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    goto :goto_0

    .line 169
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method protected onSaveInstanceState(Landroid/os/Bundle;)V
    .locals 0
    .parameter "outState"

    .prologue
    .line 164
    return-void
.end method

.method public runAlertServer(J)V
    .locals 4
    .parameter "time"

    .prologue
    .line 702
    iput-wide p1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    .line 703
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->isCheckListMode()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 704
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->getCheckListString()Ljava/lang/String;

    move-result-object v0

    .line 709
    .local v0, str:Ljava/lang/String;
    :goto_0
    const/4 v1, 0x1

    iget-wide v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    invoke-direct {p0, v1, v2, v3}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableAlertTime(ZJ)V

    .line 710
    iget v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nId:I

    iget-wide v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nAlertTime:J

    invoke-static {p0, v1, v0, v2, v3}, Lcom/xiaomi/notes/Tools;->setAlertTime(Landroid/content/Context;ILjava/lang/String;J)V

    .line 711
    return-void

    .line 706
    .end local v0           #str:Ljava/lang/String;
    :cond_0
    iget-object v1, p0, Lcom/xiaomi/notes/NoteEditActivity;->edtNote:Lcom/xiaomi/notes/CustomAutoLinkEditText;

    invoke-virtual {v1}, Lcom/xiaomi/notes/CustomAutoLinkEditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    .restart local v0       #str:Ljava/lang/String;
    goto :goto_0
.end method

.method public setState(I)V
    .locals 5
    .parameter "state"

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 486
    iget v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    if-ne v2, p1, :cond_0

    .line 529
    :goto_0
    :pswitch_0
    return-void

    .line 491
    :cond_0
    iget v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    packed-switch v2, :pswitch_data_0

    .line 503
    :goto_1
    :pswitch_1
    iput p1, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    .line 506
    iget v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->nState:I

    packed-switch v2, :pswitch_data_1

    goto :goto_0

    .line 511
    :pswitch_2
    const/4 v2, 0x5

    new-array v0, v2, [Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor1:Landroid/widget/ImageView;

    aput-object v2, v0, v3

    iget-object v2, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor2:Landroid/widget/ImageView;

    aput-object v2, v0, v4

    const/4 v2, 0x2

    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor3:Landroid/widget/ImageView;

    aput-object v3, v0, v2

    const/4 v2, 0x3

    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor4:Landroid/widget/ImageView;

    aput-object v3, v0, v2

    const/4 v2, 0x4

    iget-object v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->btnColor5:Landroid/widget/ImageView;

    aput-object v3, v0, v2

    .line 514
    .local v0, but:[Landroid/widget/ImageView;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_2
    array-length v2, v0

    if-ge v1, v2, :cond_2

    .line 515
    add-int/lit8 v2, v1, 0x1

    iget v3, p0, Lcom/xiaomi/notes/NoteEditActivity;->nBgColor:I

    if-ne v2, v3, :cond_1

    .line 516
    aget-object v2, v0, v1

    const v3, 0x7f020053

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 514
    :goto_3
    add-int/lit8 v1, v1, 0x1

    goto :goto_2

    .line 496
    .end local v0           #but:[Landroid/widget/ImageView;
    .end local v1           #i:I
    :pswitch_3
    invoke-direct {p0, v3}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableToolsBarBgColor(Z)V

    goto :goto_1

    .line 499
    :pswitch_4
    invoke-direct {p0, v3}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableToolsBarFontSize(Z)V

    goto :goto_1

    .line 518
    .restart local v0       #but:[Landroid/widget/ImageView;
    .restart local v1       #i:I
    :cond_1
    aget-object v2, v0, v1

    const v3, 0x7f020054

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_3

    .line 522
    :cond_2
    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableToolsBarBgColor(Z)V

    .line 523
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteEditActivity;->hideSoftKey()V

    goto :goto_0

    .line 526
    .end local v0           #but:[Landroid/widget/ImageView;
    .end local v1           #i:I
    :pswitch_5
    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteEditActivity;->setVisableToolsBarFontSize(Z)V

    goto :goto_0

    .line 491
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_3
        :pswitch_4
    .end packed-switch

    .line 506
    :pswitch_data_1
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_5
    .end packed-switch
.end method
